﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLL.Services.Requests.Listing;

namespace BLL.Services.Requests
{
    public class RequestsService : IRequestsService
    {
        private readonly RequestsCollection _requestsCollection;

        public RequestsService(RequestsCollection requestsCollection)
        {
            _requestsCollection = requestsCollection;
        }

        public void Create(Request requests)
        {
            _requestsCollection.Create(requests);
        }

        public void Delete(int requestId)
        {
            _requestsCollection.Delete(requestId);
        }

        public Request GetRequestById(int requestId)
        {
            return _requestsCollection.GetRequestById(requestId);
        }

        public RequestsListing Listing(int page, int size, string column, int direction, RequestsFilter filter)
        {
            return _requestsCollection.Listing(page, size, column, direction, filter);
        }

        public void Save(Request requests)
        {
            _requestsCollection.Save(requests);
        }
    }
}
